﻿using System;
using Microsoft.AspNetCore.Http;

namespace K9Nano.LayIM.Utils
{
    public static class HttpRequestExtensions
    {
        public static string GetAbsoluteUrl(this HttpRequest request, string relativeUrl)
        {
            return new Uri(new Uri(request.Scheme + "://" + request.Host.Value), relativeUrl).AbsoluteUri;
        }
    }
}